package com.nf.action;


import com.nf.emtiy.Student;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;


@Controller
public class Test{

    @RequestMapping("/test01")
    public String t1(){
        return "test02";
    }

    @ResponseBody
    @RequestMapping("/test02")
    public Student t2(String name){
        Student student = new Student();
        student.setId(1);
        student.setName(name);
        System.out.println(name+student.getName());
        return student;
    }
}
